using System.Collections.Generic;
using UnityEngine;

public class UIStyleChangerButton : MonoBehaviour
{
	public UILabel label;

	public List<string> styleNames = new List<string>();

	public int currentStyle;

	public void Awake()
	{
		ApplyStyle();
	}

	public void NextStyle()
	{
		currentStyle = (currentStyle + 1) % styleNames.Count;
	}

	public void ApplyStyle()
	{
		string text = styleNames[currentStyle];
		UIStyle.ChangeStyle(text);
		UITools.ChangeText(label, text);
	}

	public void OnClick()
	{
		NextStyle();
		ApplyStyle();
	}
}
